.state,
a {
  position: relative;

  &:after {
    content: ' ';
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: transparent;
    opacity: 0;
    box-shadow: 0 0 0 (1*@rem) @state-cover-active-color;
    transform: scale(@state-scale-from);
    .transition-fast();
  }

  &.circle:after {.circle()}
  &.rounded:after {.rounded()}

  &:hover,
  &.hover {
    &:after {
      background-color: @state-cover-hover-color;
      opacity: @state-cover-hover-opacity;
      transform: scale(1);
    }
  }

  &:focus {
    outline: none;
    &:after {
      box-shadow: inset 0 0 0 (1*@rem) fade(@state-cover-active-color, 20%), 0 0 0 (2*@rem) fade(@color-focus, 40%);
      background-color: fade(@state-cover-active-color, 10%);
      transform: scale(1);
      opacity: 1;
    }
  }

  .open > &,
  &.open,
  &:active {
    &:after {
      transform: scale(1);
      background-color: @state-cover-active-color;
      opacity: @state-cover-active-opacity;
    }
  }
}

.disabled,
.disabled > a,
[disabled] {
  cursor: not-allowed!important;
  pointer-events: none!important;
  filter: grayscale(100%);
  opacity: @state-disabled-opacity!important;
  box-shadow: none!important;

  &:after {display: none!important}
}

.as-load-indicator,
.loading {
  color: transparent!important;

  > * {visibility: hidden}

  &:before {
    .spin();
    display: block;
    content: ' ';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -(9*@rem);
    margin-left: -(9*@rem);
    border: (3*@rem) dotted rgba(255,255,255,.5);
    border-color: rgba(255,255,255,.1) rgba(255,255,255,.4) rgba(255,255,255,.5) rgba(255,255,255,.6);
    width: (18*@rem);
    height: (18*@rem);
    border-radius: 50%;
    .transition-fast(opacity);
  }

  &.loading-light:before {
    border-color: rgba(0,0,0,.1) rgba(0,0,0,.2) rgba(0,0,0,.3) rgba(0,0,0,.4);
  }
}

.as-load-indicator {
  &:before {
    opacity: 0;
    animation: none;
  }

  &.loading:before {
    opacity: 1;
    .spin();
  }
}
